ini_open('config.ini')

global.dice_count = ini_read_real('damage', 'dice_count', 18)
global.dice_faces = ini_read_real('damage', 'dice_faces', 6)

global.start_floor = ini_read_real('elevator', 'start_floor', 9)
global.opening_time = ini_read_real('elevator', 'opening_time', 2)
global.closing_time = ini_read_real('elevator', 'closing_time', 2)
global.waiting_time = ini_read_real('elevator', 'waiting_time', 5)
global.moving_time = ini_read_real('elevator', 'moving_time', 5)
global.stink_recover = ini_read_real('elevator', 'stink_recover', 30)

global.victim_hp = ini_read_real('npc', 'victim_hp', 50)
global.bearing_hp = ini_read_real('npc', 'bearing_hp', 20)
global.uncomfortable_time = ini_read_real('npc', 'uncomfortable_time', 2)
global.flying_time = ini_read_real('npc', 'flying_time', 3)
global.min_victim_count = ini_read_real('npc', 'min_victim_count', 1)
global.max_victim_count = ini_read_real('npc', 'max_victim_count', 1)

global.is_negative_stink = ini_read_real('switch', 'is_negative_stink', 0)
global.is_fart_when_dying = ini_read_real('switch', 'is_fart_when_dying', 1)
global.is_fart_add_stink = ini_read_real('switch', 'is_fart_add_stink', 1)


// ----
globalvar otherpos, otherposx, otherposy
for (i=0; i<4; i++)
{
    global.otherpos[i] = 0
}
global.otherposx[0]=45
global.otherposy[0]=460
global.otherposx[1]=275
global.otherposy[1]=460
global.otherposx[2]=90
global.otherposy[2]=440
global.otherposx[3]=230
global.otherposy[3]=440


// ----
global.current_floor = global.start_floor + 1
global.elevator_state = 'moving'
global.opening_speed = 80 / (global.opening_time * 30)
global.closing_speed = 80 / (global.closing_time * 30)
global.walking_speed = 88 / 30
global.stink = 0
global.stink_recover_per_step = global.stink_recover / 30
global.new_comers = 0
global.new_comers_count = 0
global.npc_count = 0
global.alpha_diminishing = 1 / (global.flying_time * 30)
global.ghost_count = 0
global.game_state = 'pausing'
